﻿<template>
    <div class="page view-image-page">
        <div class="navbar">
            <div class="navbar-bg"></div>
            <div class="navbar-inner navbar-inner-centered-title">
                <div class="title text-color-primary">检查图像</div>
                <div class="right">
                    <!-- 关闭弹窗 -->
                    <a class="link  color-primary" id="close-iamge-popup" data-popup=".image-popup">
                        <i class="icon f7-icons if-not-md">xmark_circle</i>
                        <i class="icon material-icons md-only ">xmark_circle</i>
                    </a>
                </div>
            </div>
        </div>
        <div class="page-content" id="image-page-content">
            
        </div>
    </div>
</template>
<script>
    export default (props, { $, $on, $f7, $h, $f7router, $theme, $update, $store }) => {
        let examId = '';
        $on('pageInit', (e, page) => {
            //$f7.on("LookPicture", () => {
            //    debugger;
            //    if (examId !== $store.getters.examId.value) {
            //        examId = $store.getters.examId.value;
            //        fetch(`/api/exam/get-dicom-client-url`, {
            //            method: 'GET',
            //            headers: { 'Content-Type': 'application/json' }
            //        }).then((res) => {
            //            res.json().then((result) => {
            //                if (result.success && result.data) {
            //                    let url = result.data;
            //                    if (result.data.includes('?')) {
            //                        url += `&examIds=${examId}`;
            //                    } else {
            //                        url += `?examIds=${examId}`;
            //                    }
            //                    let $iframe = $(".view-image-page #image-iframe");
            //                    $iframe[0].contentWindow.location = url;
            //                }
            //            });
            //        })
            //    }
            //})
            $("#close-iamge-popup").on('click', () => {
                $('.image-popup').hide();
                $('.popup-backdrop').hide();
            });
        })

        return $render;
    };
</script>
